package Chain_of_Responsibility;

public class Client {
	
	public static void main(String[] args) {
		PurchaseRequest purchaseRequest = new PurchaseRequest(1, 400000, 1); 
	
		
		DepartmentApprover departmentApprover = new DepartmentApprover("张主任");
		CollegeApporver collegeApporver = new CollegeApporver("李院长");
		ViceSchoolMasterApprover viceSchoolMasterApprover = new ViceSchoolMasterApprover("王副校长");
		SchoolMasterApprover schoolMasterApprover = new SchoolMasterApprover("田校长");
			
		departmentApprover.setApprover(collegeApporver);
		collegeApporver.setApprover(viceSchoolMasterApprover);
		viceSchoolMasterApprover.setApprover(schoolMasterApprover);
		schoolMasterApprover.setApprover(departmentApprover);
				
		departmentApprover.processRequest(purchaseRequest);
		schoolMasterApprover.processRequest(purchaseRequest);

		departmentApprover.processRequest(purchaseRequest);
		schoolMasterApprover.processRequest(purchaseRequest);


		
		
		
		
		
		
		
	}
}
